Autogenerated HTML docs for v1.8.1-rc2-5-g252f9
diff --git a/git-clone.html b/git-clone.html index 8fc7d78..1446e95 100644 --- a/git-clone.html +++ b/git-clone.html
@@ -2,15 +2,25 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="generator" content="AsciiDoc 8.5.2" /> +<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> +<meta name="generator" content="AsciiDoc 8.6.8" /> <title>git-clone(1)</title> <style type="text/css"> -/* Debug borders */ -p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { -/* - border: 1px solid red; -*/ +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ + +/* Default font. */ +body { + font-family: Georgia,serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Arial,Helvetica,sans-serif; } body { @@ -35,13 +45,8 @@ color: #083194; } -tt { - color: navy; -} - h1, h2, h3, h4, h5, h6 { color: #527bbd; - font-family: sans-serif; margin-top: 1.2em; margin-bottom: 0.5em; line-height: 1.3; @@ -59,9 +64,11 @@ h3 + * { clear: left; } +h5 { + font-size: 1.0em; +} div.sectionbody { - font-family: serif; margin-left: 0; } @@ -77,45 +84,48 @@ ul, ol, li > p { margin-top: 0; } +ul > li { color: #aaa; } +ul > li > * { color: black; } -pre { +.monospaced, code, pre { + font-family: "Courier New", Courier, monospace; + font-size: inherit; + color: navy; padding: 0; margin: 0; } -span#author { + +#author { color: #527bbd; - font-family: sans-serif; font-weight: bold; font-size: 1.1em; } -span#email { +#email { } -span#revnumber, span#revdate, span#revremark { - font-family: sans-serif; +#revnumber, #revdate, #revremark { } -div#footer { - font-family: sans-serif; +#footer { font-size: small; border-top: 2px solid silver; padding-top: 0.5em; margin-top: 4.0em; } -div#footer-text { +#footer-text { float: left; padding-bottom: 0.5em; } -div#footer-badges { +#footer-badges { float: right; padding-bottom: 0.5em; } -div#preamble { +#preamble { margin-top: 1.5em; margin-bottom: 1.5em; } -div.tableblock, div.imageblock, div.exampleblock, div.verseblock, +div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { margin-top: 1.0em; @@ -135,7 +145,6 @@ /* Block element titles. */ div.title, caption.title { color: #527bbd; - font-family: sans-serif; font-weight: bold; text-align: left; margin-top: 1.0em; @@ -157,13 +166,15 @@ div.sidebarblock > div.content { background: #ffffee; - border: 1px solid silver; + border: 1px solid #dddddd; + border-left: 4px solid #f0f0f0; padding: 0.5em; } div.listingblock > div.content { - border: 1px solid silver; - background: #f4f4f4; + border: 1px solid #dddddd; + border-left: 5px solid #f0f0f0; + background: #f8f8f8; padding: 0.5em; } @@ -171,8 +182,8 @@ padding-left: 1.0em; margin-left: 1.0em; margin-right: 10%; - border-left: 5px solid #dddddd; - color: #777777; + border-left: 5px solid #f0f0f0; + color: #888; } div.quoteblock > div.attribution { @@ -180,8 +191,9 @@ text-align: right; } -div.verseblock > div.content { - white-space: pre; +div.verseblock > pre.content { + font-family: inherit; + font-size: inherit; } div.verseblock > div.attribution { padding-top: 0.75em; @@ -254,35 +266,12 @@ margin-bottom: 0.1em; } -div.tableblock > table { - border: 3px solid #527bbd; -} -thead, p.table.header { - font-family: sans-serif; - font-weight: bold; -} tfoot { font-weight: bold; } td > div.verse { white-space: pre; } -p.table { - margin-top: 0; -} -/* Because the table frame attribute is overriden by CSS in most browsers. */ -div.tableblock > table[frame="void"] { - border-style: none; -} -div.tableblock > table[frame="hsides"] { - border-left-style: none; - border-right-style: none; -} -div.tableblock > table[frame="vsides"] { - border-top-style: none; - border-bottom-style: none; -} - div.hdlist { margin-top: 0.8em; @@ -339,25 +328,32 @@ min-width: 100px; } - -@media print { - div#footer-badges { display: none; } +div.colist td { + padding-right: 0.5em; + padding-bottom: 0.3em; + vertical-align: top; +} +div.colist td img { + margin-top: 0.3em; } -div#toc { +@media print { + #footer-badges { display: none; } +} + +#toc { margin-bottom: 2.5em; } -div#toctitle { +#toctitle { color: #527bbd; - font-family: sans-serif; font-size: 1.1em; font-weight: bold; margin-top: 1.0em; margin-bottom: 0.1em; } -div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { +div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; } @@ -373,69 +369,173 @@ margin-left: 6em; font-size: 0.9em; } -/* Overrides for manpage documents */ -h1 { + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + +div.unbreakable { page-break-inside: avoid; } + + +/* + * xhtml11 specific + * + * */ + +div.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.tableblock > table { + border: 3px solid #527bbd; +} +thead, p.table.header { + font-weight: bold; + color: #527bbd; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +/* + * html5 specific + * + * */ + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #527bbd; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #527bbd; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #527bbd; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + +/* + * manpage specific + * + * */ + +body.manpage h1 { padding-top: 0.5em; padding-bottom: 0.5em; border-top: 2px solid silver; border-bottom: 2px solid silver; } -h2 { +body.manpage h2 { border-style: none; } -div.sectionbody { - margin-left: 5%; +body.manpage div.sectionbody { + margin-left: 3em; } @media print { - div#toc { display: none; } + body.manpage div#toc { display: none; } } -/* Workarounds for IE6's broken and incomplete CSS2. */ -div.sidebar-content { - background: #ffffee; - border: 1px solid silver; - padding: 0.5em; -} -div.sidebar-title, div.image-title { - color: #527bbd; - font-family: sans-serif; - font-weight: bold; - margin-top: 0.0em; - margin-bottom: 0.5em; -} - -div.listingblock div.content { - border: 1px solid silver; - background: #f4f4f4; - padding: 0.5em; -} - -div.quoteblock-attribution { - padding-top: 0.5em; - text-align: right; -} - -div.verseblock-content { - white-space: pre; -} -div.verseblock-attribution { - padding-top: 0.75em; - text-align: left; -} - -div.exampleblock-content { - border-left: 3px solid #dddddd; - padding-left: 0.5em; -} - -/* IE6 sets dynamically generated links as visited. */ -div#toc a:visited { color: blue; } </style> <script type="text/javascript"> /*<+'])'); + var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); // Function that scans the DOM tree for header elements (the DOM2 // nodeIterator API would be a better technique but not supported by all // browsers). @@ -497,6 +597,25 @@ } var toc = document.getElementById("toc"); + if (!toc) { + return; + } + + // Delete existing TOC entries in case we're reloading the TOC. + var tocEntriesToRemove = []; + var i; + for (i = 0; i < toc.childNodes.length; i++) { + var entry = toc.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' + && entry.getAttribute("class") + && entry.getAttribute("class").match(/^toclevel/)) + tocEntriesToRemove.push(entry); + } + for (i = 0; i < tocEntriesToRemove.length; i++) { + toc.removeChild(tocEntriesToRemove[i]); + } + + // Rebuild TOC entries. var entries = tocEntries(document.getElementById("content"), toclevels); for (var i = 0; i < entries.length; ++i) { var entry = entries[i]; @@ -524,24 +643,44 @@ */ footnotes: function () { - var cont = document.getElementById("content"); + // Delete existing footnote entries in case we're reloading the footnodes. + var i; var noteholder = document.getElementById("footnotes"); + if (!noteholder) { + return; + } + var entriesToRemove = []; + for (i = 0; i < noteholder.childNodes.length; i++) { + var entry = noteholder.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") + entriesToRemove.push(entry); + } + for (i = 0; i < entriesToRemove.length; i++) { + noteholder.removeChild(entriesToRemove[i]); + } + + // Rebuild footnote entries. + var cont = document.getElementById("content"); var spans = cont.getElementsByTagName("span"); var refs = {}; var n = 0; for (i=0; i<spans.length; i++) { if (spans[i].className == "footnote") { n++; - // Use [\s\S] in place of . so multi-line matches work. - // Because JavaScript has no s (dotall) regex flag. - note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; + var note = spans[i].getAttribute("data-note"); + if (!note) { + // Use [\s\S] in place of . so multi-line matches work. + // Because JavaScript has no s (dotall) regex flag. + note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; + spans[i].innerHTML = + "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + + "' title='View footnote' class='footnote'>" + n + "</a>]"; + spans[i].setAttribute("data-note", note); + } noteholder.innerHTML += "<div class='footnote' id='_footnote_" + n + "'>" + "<a href='#_footnoteref_" + n + "' title='Return to text'>" + n + "</a>. " + note + "</div>"; - spans[i].innerHTML = - "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + - "' title='View footnote' class='footnote'>" + n + "</a>]"; var id =spans[i].getAttribute("id"); if (id != null) refs["#"+id] = n; } @@ -561,13 +700,36 @@ } } } +}, + +install: function(toclevels) { + var timerId; + + function reinstall() { + asciidoc.footnotes(); + if (toclevels) { + asciidoc.toc(toclevels); + } + } + + function reinstallAndRemoveTimer() { + clearInterval(timerId); + reinstall(); + } + + timerId = setInterval(reinstall, 500); + if (document.addEventListener) + document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); + else + window.onload = reinstallAndRemoveTimer; } } +asciidoc.install(); /*]]>*/ </script> </head> -<body> +<body class="manpage"> <div id="header"> <h1> git-clone(1) Manual Page @@ -580,36 +742,41 @@ </div> </div> <div id="content"> +<div class="sect1"> <h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<div class="verseblock-content"><em>git clone</em> [--template=<template_directory>] +<pre class="content"><em>git clone</em> [--template=<template_directory>] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>] [--separate-git-dir <git dir>] [--depth <depth>] [--[no-]single-branch] [--recursive|--recurse-submodules] [--] <repository> - [<directory>]</div> -<div class="verseblock-attribution"> + [<directory>]</pre> +<div class="attribution"> </div></div> </div> +</div> +<div class="sect1"> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> <div class="paragraph"><p>Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository -(visible using <tt>git branch -r</tt>), and creates and checks out an +(visible using <code>git branch -r</code>), and creates and checks out an initial branch that is forked from the cloned repository’s currently active branch.</p></div> -<div class="paragraph"><p>After the clone, a plain <tt>git fetch</tt> without arguments will update -all the remote-tracking branches, and a <tt>git pull</tt> without +<div class="paragraph"><p>After the clone, a plain <code>git fetch</code> without arguments will update +all the remote-tracking branches, and a <code>git pull</code> without arguments will in addition merge the remote master branch into the current master branch, if any (this is untrue when "--single-branch" is given; see below).</p></div> <div class="paragraph"><p>This default configuration is achieved by creating references to -the remote branch heads under <tt>refs/remotes/origin</tt> and -by initializing <tt>remote.origin.url</tt> and <tt>remote.origin.fetch</tt> +the remote branch heads under <code>refs/remotes/origin</code> and +by initializing <code>remote.origin.url</code> and <code>remote.origin.fetch</code> configuration variables.</p></div> </div> +</div> +<div class="sect1"> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> <div class="dlist"><dl> @@ -625,18 +792,18 @@ this flag bypasses the normal "git aware" transport mechanism and clones the repository by making a copy of HEAD and everything under objects and refs directories. - The files under <tt>.git/objects/</tt> directory are hardlinked + The files under <code>.git/objects/</code> directory are hardlinked to save space when possible. </p> -<div class="paragraph"><p>If the repository is specified as a local path (e.g., <tt>/path/to/repo</tt>), +<div class="paragraph"><p>If the repository is specified as a local path (e.g., <code>/path/to/repo</code>), this is the default, and --local is essentially a no-op. If the repository is specified as a URL, then this flag is ignored (and we -never use the local optimizations). Specifying <tt>--no-local</tt> will -override the default when <tt>/path/to/repo</tt> is given, using the regular +never use the local optimizations). Specifying <code>--no-local</code> will +override the default when <code>/path/to/repo</code> is given, using the regular git transport instead.</p></div> <div class="paragraph"><p>To force copying instead of hardlinking (which may be desirable if you are trying to make a back-up of your repository), but still avoid the -usual "git aware" transport mechanism, <tt>--no-hardlinks</tt> can be used.</p></div> +usual "git aware" transport mechanism, <code>--no-hardlinks</code> can be used.</p></div> </dd> <dt class="hdlist1"> --no-hardlinks @@ -644,7 +811,7 @@ <dd> <p> Optimize the cloning process from a repository on a - local filesystem by copying files under <tt>.git/objects</tt> + local filesystem by copying files under <code>.git/objects</code> directory. </p> </dd> @@ -658,7 +825,7 @@ <p> When the repository to clone is on the local machine, instead of using hard links, automatically setup - <tt>.git/objects/info/alternates</tt> to share the objects + <code>.git/objects/info/alternates</code> to share the objects with the source repository. The resulting repository starts out without any object of its own. </p> @@ -667,17 +834,17 @@ repository using this option and then delete branches (or use any other git command that makes any existing commit unreferenced) in the source repository, some objects may become unreferenced (or dangling). -These objects may be removed by normal git operations (such as <tt>git commit</tt>) -which automatically call <tt>git gc --auto</tt>. (See <a href="git-gc.html">git-gc(1)</a>.) +These objects may be removed by normal git operations (such as <code>git commit</code>) +which automatically call <code>git gc --auto</code>. (See <a href="git-gc.html">git-gc(1)</a>.) If these objects are removed and were referenced by the cloned repository, then the cloned repository will become corrupt.</p></div> -<div class="paragraph"><p>Note that running <tt>git repack</tt> without the <tt>-l</tt> option in a repository -cloned with <tt>-s</tt> will copy objects from the source repository into a pack -in the cloned repository, removing the disk space savings of <tt>clone -s</tt>. -It is safe, however, to run <tt>git gc</tt>, which uses the <tt>-l</tt> option by +<div class="paragraph"><p>Note that running <code>git repack</code> without the <code>-l</code> option in a repository +cloned with <code>-s</code> will copy objects from the source repository into a pack +in the cloned repository, removing the disk space savings of <code>clone -s</code>. +It is safe, however, to run <code>git gc</code>, which uses the <code>-l</code> option by default.</p></div> -<div class="paragraph"><p>If you want to break the dependency of a repository cloned with <tt>-s</tt> on -its source repository, you can simply run <tt>git repack -a</tt> to copy all +<div class="paragraph"><p>If you want to break the dependency of a repository cloned with <code>-s</code> on +its source repository, you can simply run <code>git repack -a</code> to copy all objects from the source repository into a pack in the cloned repository.</p></div> </dd> <dt class="hdlist1"> @@ -686,13 +853,13 @@ <dd> <p> If the reference repository is on the local machine, - automatically setup <tt>.git/objects/info/alternates</tt> to + automatically setup <code>.git/objects/info/alternates</code> to obtain objects from the reference repository. Using an already existing repository as an alternate will require fewer objects to be copied from the repository being cloned, reducing network and local storage costs. </p> -<div class="paragraph"><p><strong>NOTE</strong>: see the NOTE for the <tt>--shared</tt> option.</p></div> +<div class="paragraph"><p><strong>NOTE</strong>: see the NOTE for the <code>--shared</code> option.</p></div> </dd> <dt class="hdlist1"> --quiet @@ -747,13 +914,13 @@ <dd> <p> Make a <em>bare</em> GIT repository. That is, instead of - creating <tt><directory></tt> and placing the administrative - files in <tt><directory>/.git</tt>, make the <tt><directory></tt> - itself the <tt>$GIT_DIR</tt>. This obviously implies the <tt>-n</tt> + creating <code><directory></code> and placing the administrative + files in <code><directory>/.git</code>, make the <code><directory></code> + itself the <code>$GIT_DIR</code>. This obviously implies the <code>-n</code> because there is nowhere to check out the working tree. Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping - them to <tt>refs/remotes/origin/</tt>. When this option is + them to <code>refs/remotes/origin/</code>. When this option is used, neither remote-tracking branches nor the related configuration variables are created. </p> @@ -763,11 +930,11 @@ </dt> <dd> <p> - Set up a mirror of the source repository. This implies <tt>--bare</tt>. - Compared to <tt>--bare</tt>, <tt>--mirror</tt> not only maps local branches of the + Set up a mirror of the source repository. This implies <code>--bare</code>. + Compared to <code>--bare</code>, <code>--mirror</code> not only maps local branches of the source to local branches of the target, it maps all refs (including remote-tracking branches, notes etc.) and sets up a refspec configuration such - that all these refs are overwritten by a <tt>git remote update</tt> in the + that all these refs are overwritten by a <code>git remote update</code> in the target repository. </p> </dd> @@ -779,8 +946,8 @@ </dt> <dd> <p> - Instead of using the remote name <tt>origin</tt> to keep track - of the upstream repository, use <tt><name></tt>. + Instead of using the remote name <code>origin</code> to keep track + of the upstream repository, use <code><name></code>. </p> </dd> <dt class="hdlist1"> @@ -792,10 +959,10 @@ <dd> <p> Instead of pointing the newly created HEAD to the branch pointed - to by the cloned repository’s HEAD, point to <tt><name></tt> branch + to by the cloned repository’s HEAD, point to <code><name></code> branch instead. In a non-bare repository, this is the branch that will be checked out. - <tt>--branch</tt> can also take tags and detaches the HEAD at that commit + <code>--branch</code> can also take tags and detaches the HEAD at that commit in the resulting repository. </p> </dd> @@ -833,7 +1000,7 @@ this takes effect immediately after the repository is initialized, but before the remote history is fetched or any files checked out. The key is in the same format as expected by - <a href="git-config.html">git-config(1)</a> (e.g., <tt>core.eol=true</tt>). If multiple + <a href="git-config.html">git-config(1)</a> (e.g., <code>core.eol=true</code>). If multiple values are given for the same key, each value will be written to the config file. This makes it safe, for example, to add additional fetch refspecs to the origin remote. @@ -859,15 +1026,15 @@ <dd> <p> Clone only the history leading to the tip of a single branch, - either specified by the <tt>--branch</tt> option or the primary - branch remote’s <tt>HEAD</tt> points at. When creating a shallow - clone with the <tt>--depth</tt> option, this is the default, unless - <tt>--no-single-branch</tt> is given to fetch the histories near the + either specified by the <code>--branch</code> option or the primary + branch remote’s <code>HEAD</code> points at. When creating a shallow + clone with the <code>--depth</code> option, this is the default, unless + <code>--no-single-branch</code> is given to fetch the histories near the tips of all branches. Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning. If the HEAD at the remote did not point at any - branch when <tt>--single-branch</tt> clone was made, no remote-tracking + branch when <code>--single-branch</code> clone was made, no remote-tracking branch is created. </p> </dd> @@ -881,10 +1048,10 @@ <p> After the clone is created, initialize all submodules within, using their default settings. This is equivalent to running - <tt>git submodule update --init --recursive</tt> immediately after + <code>git submodule update --init --recursive</code> immediately after the clone is finished. This option is ignored if the cloned repository does not have a worktree/checkout (i.e. if any of - <tt>--no-checkout</tt>/<tt>-n</tt>, <tt>--bare</tt>, or <tt>--mirror</tt> is given) + <code>--no-checkout</code>/<code>-n</code>, <code>--bare</code>, or <code>--mirror</code> is given) </p> </dd> <dt class="hdlist1"> @@ -916,13 +1083,15 @@ <p> The name of a new directory to clone into. The "humanish" part of the source repository is used if no directory is - explicitly given (<tt>repo</tt> for <tt>/path/to/repo.git</tt> and <tt>foo</tt> - for <tt>host.xz:foo/.git</tt>). Cloning into an existing directory + explicitly given (<code>repo</code> for <code>/path/to/repo.git</code> and <code>foo</code> + for <code>host.xz:foo/.git</code>). Cloning into an existing directory is only allowed if the directory is empty. </p> </dd> </dl></div> </div> +</div> +<div class="sect1"> <h2 id="_git_urls_a_id_urls_a">GIT URLS<a id="URLS"></a></h2> <div class="sectionbody"> <div class="paragraph"><p>In general, URLs contain information about the transport protocol, the @@ -1023,15 +1192,15 @@ configuration section of the form:</p></div> <div class="listingblock"> <div class="content"> -<pre><tt> [url "<actual url base>"] - insteadOf = <other url base></tt></pre> +<pre><code> [url "<actual url base>"] + insteadOf = <other url base></code></pre> </div></div> <div class="paragraph"><p>For example, with this:</p></div> <div class="listingblock"> <div class="content"> -<pre><tt> [url "git://git.host.xz/"] +<pre><code> [url "git://git.host.xz/"] insteadOf = host.xz:/path/to/ - insteadOf = work:</tt></pre> + insteadOf = work:</code></pre> </div></div> <div class="paragraph"><p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p></div> @@ -1039,19 +1208,21 @@ configuration section of the form:</p></div> <div class="listingblock"> <div class="content"> -<pre><tt> [url "<actual url base>"] - pushInsteadOf = <other url base></tt></pre> +<pre><code> [url "<actual url base>"] + pushInsteadOf = <other url base></code></pre> </div></div> <div class="paragraph"><p>For example, with this:</p></div> <div class="listingblock"> <div class="content"> -<pre><tt> [url "ssh://example.org/"] - pushInsteadOf = git://example.org/</tt></pre> +<pre><code> [url "ssh://example.org/"] + pushInsteadOf = git://example.org/</code></pre> </div></div> <div class="paragraph"><p>a URL like "git://example.org/path/to/repo.git" will be rewritten to "ssh://example.org/path/to/repo.git" for pushes, but pulls will still use the original URL.</p></div> </div> +</div> +<div class="sect1"> <h2 id="_examples">Examples</h2> <div class="sectionbody"> <div class="ulist"><ul> @@ -1061,9 +1232,9 @@ </p> <div class="listingblock"> <div class="content"> -<pre><tt>$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6 +<pre><code>$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6 $ cd my2.6 -$ make</tt></pre> +$ make</code></pre> </div></div> </li> <li> @@ -1072,9 +1243,9 @@ </p> <div class="listingblock"> <div class="content"> -<pre><tt>$ git clone -l -s -n . ../copy +<pre><code>$ git clone -l -s -n . ../copy $ cd ../copy -$ git show-branch</tt></pre> +$ git show-branch</code></pre> </div></div> </li> <li> @@ -1083,10 +1254,10 @@ </p> <div class="listingblock"> <div class="content"> -<pre><tt>$ git clone --reference my2.6 \ +<pre><code>$ git clone --reference my2.6 \ git://git.kernel.org/pub/scm/.../linux-2.7 \ my2.7 -$ cd my2.7</tt></pre> +$ cd my2.7</code></pre> </div></div> </li> <li> @@ -1095,7 +1266,7 @@ </p> <div class="listingblock"> <div class="content"> -<pre><tt>$ git clone --bare -l /home/proj/.git /pub/scm/proj.git</tt></pre> +<pre><code>$ git clone --bare -l /home/proj/.git /pub/scm/proj.git</code></pre> </div></div> </li> <li> @@ -1104,21 +1275,24 @@ </p> <div class="listingblock"> <div class="content"> -<pre><tt>$ git clone --bare -l -s /pub/scm/.../torvalds/linux-2.6.git \ - /pub/scm/.../me/subsys-2.6.git</tt></pre> +<pre><code>$ git clone --bare -l -s /pub/scm/.../torvalds/linux-2.6.git \ + /pub/scm/.../me/subsys-2.6.git</code></pre> </div></div> </li> </ul></div> </div> +</div> +<div class="sect1"> <h2 id="_git">GIT</h2> <div class="sectionbody"> <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> </div> +</div> <div id="footnotes"><hr /></div> <div id="footer"> <div id="footer-text"> -Last updated 2012-11-13 14:31:09 PDT +Last updated 2012-11-13 14:31:09 PST </div> </div> </body>